package com.gouwudai.table.view.style1;

import org.extremecomponents.table.core.TableModel;
import org.extremecomponents.table.view.AbstractHtmlView;
import org.extremecomponents.util.HtmlBuilder;

public class UserCompactView extends AbstractHtmlView {
    protected void beforeBodyInternal(TableModel model) {
        getTableBuilder().tableStart();

        getTableBuilder().theadStart();
        
        getTableBuilder().titleRowSpanColumns();

        toolbar(getHtmlBuilder(), getTableModel());
        
        getTableBuilder().filterRow();

        getTableBuilder().headerRow();

        getTableBuilder().theadEnd();

        getTableBuilder().tbodyStart();
    }
/*
 * (non-Javadoc)
 * @see org.extremecomponents.table.view.AbstractHtmlView#afterBodyInternal(org.extremecomponents.table.core.TableModel)
 *   
 */
    protected void afterBodyInternal(TableModel model) {
        getCalcBuilder().defaultCalcLayout();

        getTableBuilder().tbodyEnd();

        getTableBuilder().tableEnd();
    }
    
    protected void toolbar(HtmlBuilder html, TableModel model) {
        new UserCompactToolbar(html, model).layout();
    }
}